# Contributor: omni <omni+alpine@hack.org>
# Maintainer: omni <omni+alpine@hack.org>
pkgname=podman-tui
pkgver=1.0.0
pkgrel=1
pkgdesc="Terminal user interface for Podman v4"
url="https://github.com/containers/podman-tui"
license="Apache-2.0"
# podman (netavark & aardvark-dns -> nix crate)
arch="all !s390x"
makedepends="go gpgme-dev linux-headers btrfs-progs-dev lvm2-dev"
depends="podman"
options="!check"
source="$pkgname-$pkgver.tar.gz::https://github.com/containers/podman-tui/archive/v$pkgver.tar.gz"

# secfixes:
#   0.15.0-r0:
#     - CVE-2023-48795

export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -v .
}

package() {
	install -Dm0755 "$pkgname" -t "$pkgdir"/usr/bin
}

sha512sums="
918b3efb823a543a439ae0f56c59ee2689961ac6e39a40054a7971ddf02056ca50c7c681ca03c45590e9fdfce1822f406bbf90f9b25563a0ef9ae75b88235a8c  podman-tui-1.0.0.tar.gz
"
